﻿using System;
using System.Collections.Generic;
using agsXMPP.protocol.component;
using SBPweb.Communication.Shared.Library.Contacts;
using agsXMPP.protocol.iq.vcard;
using SBPweb.Communication.Client.Library.Xmpp.Profiles;
using agsXMPP.protocol.client;
using agsXMPP;
using System.Collections;

namespace SBPweb.Communication.Client.Library.Xmpp.Commands
{

    partial class GetProfileCommand : Command<VcardIq, agsXMPP.protocol.client.IQ>//<VCard, VCardIq>
    {

        public Profile Profile { get; protected set; }

        #region Methods

        public override VcardIq GetTypedRequest()
        {
            VcardIq viq = new VcardIq(IqType.get, new Jid(contact.Id));
            return viq;
        }

        public override void PutTypedResponse(agsXMPP.protocol.client.IQ response)
        {
            responseIq = response;
            Profile = new Profile(this.contact, response.Vcard);
        }

        #endregion

    }

}